package com.zhb.designmode.structure.adapter;

public class Test {

    /**
     * 需求就是将电源输入220V（适配者）转换为5V输出（目标）
     * @param args
     */
    public static void main(String[] args) {
        //类适配器
        PowerTarget target = new ClassPowerAdapter();
        target.output5V();
        System.out.println("===");
        //对象适配器
        PowerTarget target2 = new ObjectPowerAdapter(new PowerAdaptee());
        target2.output5V();
    }
}
